package com.zhz.livegoods.comment.controller;

import com.zhz.livegoods.comment.service.CommentService;
import com.zhz.livegoods.commons.vo.LivegoodsResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 商品评论控制器
 * @author zhz
 * @date 2020/08/05
 **/
@Controller
@CrossOrigin
public class CommentController {
    @Autowired
    private CommentService commentService;

    public LivegoodsResult getCommentByItemId(
            @RequestParam(value = "id") String itemId, int page,
            @RequestParam(defaultValue = "5") int rows){
        return commentService.findCommentByItemId(itemId, page, rows);
    }
}
